include_directories(SYSTEM
  ${PROJECT_SOURCE_DIR}/apps/libc
  ${PROJECT_SOURCE_DIR}/include)

set(APPS_C_FLAGS "-std=c99 -nostdlib -fno-builtin ${TOOLCHAIN_C_FLAGS} ${TARGET_C_FLAGS}")

set(LIBC_SRC
	ctype.c
	stdio.c
	stdlib.c
	string.c
	syscalls.c
	start.c
)

add_library(libc STATIC ${LIBC_SRC})
set_source_files_properties(${LIBC_SRC} PROPERTIES
  COMPILE_FLAGS "${APPS_C_FLAGS}")
